package loc_enum

import "gitee.com/lailonghui/vehicle-supervision-framework/pkg/dicts"

// 区域-工程车报备-审核类型
type locEgnReportAuditType int

var LocEgnReportAuditType locEgnReportAuditType

// 路线牌审批（B/D类）
func (c *locEgnReportAuditType) LineReport() int {
	return 1
}

// 路线和时段核准
func (c *locEgnReportAuditType) EgnReport() int {
	return 2
}

// 废土核准核准
func (c *locEgnReportAuditType) WlType() int {
	return 3
}

// 工程路线审批
func (c *locEgnReportAuditType) EgnProjectLine() int {
	return 4
}

func (c *locEgnReportAuditType) ToText(value int) string {
	switch value {

	case 1:
		return "路线牌审批（B/D类）"

	case 2:
		return "路线和时段核准"

	case 3:
		return "废土核准核准"

	case 4:
		return "工程路线审批"

	}
	return ""
}

func (c *locEgnReportAuditType) ToDict(value int) *dicts.IntDict {
	return &dicts.IntDict{
		Text:  c.ToText(value),
		Value: value,
	}
}

func (c *locEgnReportAuditType) ToValue(text string) int {
	switch text {

	case "路线牌审批（B/D类）":
		return 1

	case "路线和时段核准":
		return 2

	case "废土核准核准":
		return 3

	case "工程路线审批":
		return 4

	}
	return 0
}
